<%--
  Created by IntelliJ IDEA.
  User: marc
  Date: Feb 8, 2010
  Time: 11:28:16 AM
  THIS SOFTWARE IS COPYRIGHTED.  THE SOFTWARE MAY NOT BE COPIED REPRODUCED, TRANSLATED, OR REDUCED TO ANY ELECTRONIC
  MEDIUM OR MACHINE READABLE FORM WITHOUT THE PRIOR WRITTEN CONSENT OF SOCO TECHNOLOGIES.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<html>
<head>
  <title>List Bids</title>
  <link rel="stylesheet" type="text/css" href="<c:url value='style.css' />"/>
</head>
<body>
<h1>Bid Candidates</h1>

<p>The following candidates have qualified to be your REALTOR&reg;. Please select one. Once your selection is made, your auction will settle and we'll email you the results.</p>
<br/>

<form action="<c:url value='SelectBid.htm' />" method="post">
  <table class="list">
    <thead>
    <tr>
      <th>Select?</th>
      <th>Agent</th>
      <th>Volume</th>
      <th>Types</th>
      <th>Sides</th>
    </tr>
    </thead>
    <tbody>
    <c:set var='bids' value='<%=request.getAttribute("bids")%>'/>
    <c:forEach items='${bids}' var='bid' varStatus='loop'>
      <c:set var='photo' value='${bid.agent.profile.photo}'/>
      <tr>
        <td>
          <input type="radio" name="id" value="${bid.id}" ${loop.index == 0 ? "checked":""} />
        </td>
        <td>
          <img src="${photo.url}" height="${photo.height}" width="${photo.width}" style="border:1px solid black;" alt=""/>

          <p style="text-align:center; font-weight:bold;">${bid.agent.profile.full_name}</p>
        </td>
        <c:forEach items='${bid.agent.sales.charts.link}' var='link'>
          <td>
            <img src="${link.href}" alt="${link.text}" style="display:inline;"/>
          </td>
        </c:forEach>
      </tr>
    </c:forEach>
    </tbody>
  </table>
  <div id="buttons">
    <input type="submit" value="Select Winning Bid"/>
  </div>
</form>
</body>
</html>